# FROM openjdk:8-jdk
FROM openjdk:8

ENV SKY_WALKING_OPTS=""
ENV SPRING_PROFILES_ACTIVE="dev"

RUN echo "Asia/Shanghai" > /etc/timezone
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir /runa
WORKDIR /runa
ADD /plat-interface.jar .
#ADD /agent /opt/agent
VOLUME /runa
#ENTRYPOINT ["java","-Duser.timezone=Asia/Shanghai","-jar","plat-interface.jar"]
#ENTRYPOINT java ${SKY_WALKING_OPTS} -jar plat-interface.jar --spring.profiles.active=${SPRING_PROFILES_ACTIVE}
ENTRYPOINT java -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -XX:HeapDumpPath=/runa/ -jar plat-interface.jar --spring.profiles.active=${SPRING_PROFILES_ACTIVE}